package com.test.selenium.data;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.ss.usermodel.Row;

public class ShipmentData {
	boolean debugMode = false;
	
	//Shipment
	private String shipperPartyAccount;
	private String consigneePartyAccount;
	private String vendorPartyAccount;
	private String productCode;
	private String PaymentTerm;
	private String incoTermCode;
	private String Origin;
	private String Destination;
	private String BookedPieces;
	private String BookedWeight;
	private String BookedWeightType;
	//Pieceline
	private String PackageCount;
	private String PackageType;
	private String ShortDescription;
	//ShipCharges
	private String ShipmentChargeTypeCode;
	private String ShipChargeAmount;
	private String ShipChargeCurrencyCode;
	
	public ShipmentData(HSSFSheet shipmentSheet) {
		Row row = shipmentSheet.getRow(1);
		
		//Shipment
		shipperPartyAccount = row.getCell(0).getStringCellValue().trim();
		consigneePartyAccount = row.getCell(1).getStringCellValue().trim();
		productCode = row.getCell(2).getStringCellValue().trim();
		incoTermCode = row.getCell(3).getStringCellValue().trim();
		PaymentTerm = row.getCell(4).getStringCellValue().trim();
		Origin = row.getCell(5).getStringCellValue().trim();
		Destination = row.getCell(6).getStringCellValue().trim();
		BookedPieces = row.getCell(7).getStringCellValue().trim();
		BookedWeight = row.getCell(8).getStringCellValue().trim();
		BookedWeightType = row.getCell(9).getStringCellValue().trim();
		//Pieceline
		PackageCount = row.getCell(10).getStringCellValue().trim();
		PackageType = row.getCell(11).getStringCellValue().trim();
		ShortDescription = row.getCell(12).getStringCellValue().trim();
		//ShipCharges
		ShipmentChargeTypeCode = row.getCell(13).getStringCellValue().trim();
		ShipChargeAmount = row.getCell(14).getStringCellValue().trim();
		ShipChargeCurrencyCode =row.getCell(15).getStringCellValue().trim();
		vendorPartyAccount = row.getCell(16).getStringCellValue().trim();
		
		if (debugMode) {
			printData();
		}
	}
	
	private void printData() {
		//Shipment
		System.out.println("shipper: " + shipperPartyAccount);
		System.out.println("consignee: " + consigneePartyAccount);
		System.out.println("vendor: " + vendorPartyAccount);
		System.out.println("productCode: " + productCode);
		System.out.println("incoTermCode: " + incoTermCode);
		System.out.println("PaymentTerm: " + PaymentTerm);
		System.out.println("Origin: " + Origin);
		System.out.println("Destination: " + Destination);
		System.out.println("BookedPieces: " + BookedPieces);
		System.out.println("BookedWeight: " + BookedWeight);
		System.out.println("BookedWeightType: " + BookedWeightType);
		//Pieceline
		System.out.println("PackageCount: " + PackageCount);
		System.out.println("PackageType: " + PackageType);
		System.out.println("ShortDescription: " + ShortDescription);
		//ShipCharges
        System.out.println("ShipmentChargeTypeCode:" + ShipmentChargeTypeCode);
        System.out.println("ShipChargeAmount:" + ShipChargeAmount);
		System.out.println("ShipChargeCurrencyCode:" + ShipChargeCurrencyCode);
	}
	
	//Shipment	
	public String getShipperPartyAccount() {
		return this.shipperPartyAccount;
	}
	
	public String getConsigneePartyAccount() {
		return this.consigneePartyAccount;
	}
	
	public String getvendorPartyAccount() {
		return this.vendorPartyAccount;
	}
	
	public String getProductCode() {
		return this.productCode;
	}	
	
	public String getIncoTermCode() {
		return this.incoTermCode;
	}
	
	public String getPaymentTerm() {
		return this.PaymentTerm;
	}
	
	public String getOrigin() {
		return this.Origin;
	}
	
	public String getDestination() {
		return this.Destination;
	}
	
	public String getBookedPieces() {
		return this.BookedPieces;
	}
	
	public String getBookedWeight() {
		return this.BookedWeight;
	}
	
	public String getBookedWeightType() {
		return this.BookedWeightType;
	}
	
	//Pieceline
	public String getPackageCount() {
		return this.PackageCount;
	}
	
	public String getPackageType() {
		return this.PackageType;
	}
	
	public String getShortDescription() {
		return this.ShortDescription;
	}
	
	//ShipCharges
	public String getShipmentChargeTypeCode() {
		return this.ShipmentChargeTypeCode;
	}
	
	public String getShipChargeAmount() {
		return this.ShipChargeAmount;
	}
	
	public String getShipChargeCurrencyCode() {
		return this.ShipChargeCurrencyCode;
	}
}
